package whf.test;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import whf.framework.entity.Entity;
import whf.framework.exception.CreateException;
import whf.framework.exception.DAOException;
import whf.framework.exception.DuplicateException;
import whf.framework.exception.FindException;
import whf.framework.exception.NotFoundException;
import whf.framework.exception.RemoveException;
import whf.framework.exception.ServiceException;
import whf.framework.exception.UpdateException;
import whf.framework.meta.Meta;
import whf.framework.service.Service;

/**
 * @author king
 * @create Jan 12, 2008 3:54:21 PM
 * 
 */
public abstract class BaseServiceTestCase<T extends Entity> extends BaseTestCase{
	protected abstract Service<T> getService();
	protected abstract T newInstance();
	
	public void testCreate() throws CreateException {
		T entity = newInstance();
		this.getService().create(entity);
	}

	public T duplicate(T entity, int deepth) throws DuplicateException,
			CreateException {
		return null;
	}

	public T duplicate(T entity) throws DuplicateException, CreateException {
		return null;
	}

	public T findByPrimaryKey(Serializable key) throws NotFoundException {
		return null;
	}

	public Meta getMeta() {
		// TODO Auto-generated method stub
		return null;
	}

	public Object invokeMethod(String methodName, Class[] types, Object[] params)
			throws ServiceException, NoSuchMethodException {
		// TODO Auto-generated method stub
		return null;
	}

	public void remove(T entity) throws RemoveException {
		// TODO Auto-generated method stub
		
	}

	public void removeByPrimaryKey(long key) throws RemoveException {
		// TODO Auto-generated method stub
		
	}

	public void removeByPrimaryKey(long[] keys) throws RemoveException {
		// TODO Auto-generated method stub
		
	}

	public void removeByPrimaryKey(Serializable key) throws RemoveException {
		// TODO Auto-generated method stub
		
	}

	public void removeByPrimaryKey(Serializable[] keys) throws RemoveException {
		// TODO Auto-generated method stub
		
	}

	public void update(T entity) throws UpdateException {
		// TODO Auto-generated method stub
		
	}

	public List<T> find(String query, Object arg) throws FindException {
		// TODO Auto-generated method stub
		return null;
	}

	public List<T> find(String query, Object[] args) throws FindException {
		// TODO Auto-generated method stub
		return null;
	}

	public List<T> find(String query) throws FindException {
		// TODO Auto-generated method stub
		return null;
	}

	public List<T> findAll() throws FindException {
		// TODO Auto-generated method stub
		return null;
	}

	public List<T> findAll(int start, int pageSize) throws FindException {
		// TODO Auto-generated method stub
		return null;
	}

	public List<T> findAllWithoutLazy() throws FindException {
		// TODO Auto-generated method stub
		return null;
	}

	public List<T> findAllWithoutLazy(int start, int pageSize)
			throws FindException {
		// TODO Auto-generated method stub
		return null;
	}

	public T findByCode(String code) throws FindException {
		// TODO Auto-generated method stub
		return null;
	}

	public T findByPrimaryKeyWithoutLazy(Serializable key)
			throws NotFoundException {
		// TODO Auto-generated method stub
		return null;
	}

	public List<T> findByProperty(Map<String, Object> properties, int start,
			int pageSize) throws FindException {
		// TODO Auto-generated method stub
		return null;
	}

	public List<T> findWithoutLazy(String queryString, int start, int pageSize)
			throws FindException {
		// TODO Auto-generated method stub
		return null;
	}

	public List<T> findWithoutLazy(String queryString, Object arg, int start,
			int pageSize) throws FindException {
		// TODO Auto-generated method stub
		return null;
	}

	public List<T> findWithoutLazy(String queryString, Object arg)
			throws FindException {
		// TODO Auto-generated method stub
		return null;
	}

	public List<T> findWithoutLazy(String queryString, Object[] params,
			int start, int pageSize) throws FindException {
		// TODO Auto-generated method stub
		return null;
	}

	public List<T> findWithoutLazy(String queryString, Object[] params)
			throws FindException {
		// TODO Auto-generated method stub
		return null;
	}

	public List<T> findWithoutLazy(String queryString) throws FindException {
		// TODO Auto-generated method stub
		return null;
	}

	public int getRowCount(String fromAndWhere, Object[] params)
			throws FindException {
		// TODO Auto-generated method stub
		return 0;
	}

	public int getRowCount(String conditionString) throws DAOException {
		// TODO Auto-generated method stub
		return 0;
	}

	public List<T> list(String queryString, int start, int rowsPerPage) {
		// TODO Auto-generated method stub
		return null;
	}

	public List<T> list(String queryString, Object[] paramValues, int start,
			int rowsPerPage) {
		// TODO Auto-generated method stub
		return null;
	}

	public List<T> list(String queryString, String[] paramNames,
			Object[] paramValues, int start, int rowsPerPage) {
		// TODO Auto-generated method stub
		return null;
	}

	public int getQueryRowCount(String propertyString) throws FindException {
		// TODO Auto-generated method stub
		return 0;
	}

	public List<T> query(String propertyString, int start, int pageSize)
			throws FindException {
		// TODO Auto-generated method stub
		return null;
	}

	public List<T> query(String propertyString) throws FindException {
		// TODO Auto-generated method stub
		return null;
	}

	public List<T> queryWithoutLazy(String propertyString, int start,
			int pageSize) throws FindException {
		// TODO Auto-generated method stub
		return null;
	}

	public List<T> queryWithoutLazy(String propertyString) throws FindException {
		// TODO Auto-generated method stub
		return null;
	}

}
